-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
more Parallel InSty fixes #2017
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine.
PDB ensemble:
In [1]: from prody import *
In [2]: atoms2 = parsePDB('2k39')
In [3]: interactionsTrajectory = InteractionsTrajectory('trajectory')
In [4]: interactionsTrajectory.calcProteinInteractionsTrajectory(atoms2, stop_frame=5)
Out[4]:
[[43, 52, 53, 50, 49, 50],
[3, 6, 2, 4, 5, 6],
[0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0],
[16, 19, 16, 18, 20, 17],
[0, 0, 0, 0, 0, 0]]
In [5]: interactionsTrajectory.calcProteinInteractionsTrajectory(atoms2, stop_frame=5)
Out[5]:
[[43, 52, 53, 50, 49, 50],
[3, 6, 2, 4, 5, 6],
[0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0],
[16, 19, 16, 18, 20, 17],
[0, 0, 0, 0, 0, 0]]
In [6]: interactionsTrajectory.calcProteinInteractionsTrajectory(atoms2, stop_frame=5)
Out[6]:
[[43, 52, 53, 50, 49, 50],
[3, 6, 2, 4, 5, 6],
[0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0],
[16, 19, 16, 18, 20, 17],
[0, 0, 0, 0, 0, 0]]
In [7]: interactionsTrajectory.getInteractions()
Out[7]:
[[[['GLN49', 'NE2_784', 'A', 'GLU51', 'OE2_820', 'A', 2.5853, 16.2407],
['LYS11', 'NZ_175', 'A', 'GLU34', 'OE1_547', 'A', 2.6141, 7.0039],
['GLY10', 'N_160', 'A', 'THR7', 'O_116', 'A', 2.6801, 19.8254],
['ARG72', 'N_1149', 'A', 'GLN40', 'O_624', 'A', 2.6883, 21.0779],
['ARG72', 'NH1_1158', 'A', 'GLN40', 'OE1_628', 'A', 2.7336, 7.4598],
..
I also tested calcXX, where XX is the interaction type.
In [10]: rib = calcRepulsiveIonicBondingTrajectory(atoms2)
In [11]: rib
Out[11]:
[[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[],
[['ARG72', 'NH1_1158_1159', 'A', 'ARG74', 'NH1_1201_1202', 'A', 4.1822]],
[],
[['ASP52', 'OD1_833_834', 'A', 'GLU24', 'OE1_378_379', 'A', 4.0632]],
[],
[],
[],
..
..
Trajectory:
In [16]: PDBfile = "5kqm_all_sci.pdb"
...: Trajectoryfile = 'NAMD_D2.dcd'
...: atoms = parsePDB(PDBfile)
...: dcd = Trajectory(Trajectoryfile)
...:
...: dcd.link(atoms)
...: dcd.setCoords(atoms)
In [17]: interactionsTrajectory2 = InteractionsTrajectory('trajectory2')
In [18]: interactionsTrajectory2.calcProteinInteractionsTrajectory(atoms, dcd, start_frame=5, stop_frame=10)
Out[18]:
[[119, 123, 125, 125, 120, 126],
[15, 16, 15, 16, 15, 14],
[0, 0, 0, 0, 0, 0],
[1, 3, 3, 2, 3, 3],
[3, 2, 4, 3, 3, 3],
[34, 37, 36, 36, 33, 33],
[0, 0, 0, 0, 0, 0]]
I think we were getting the wrong number of frames being read and maybe this is now fixed |
start_frame=5, stop_frame=10 -> As a result, we have 6 computed frames because we are counting in the 5th, 6th, 7th, 8th, 9th, and 10th frames. I mentioned about it last week. That it might be confusing. |
I think it makes sense. We start with and include frame 5 and continue until we have included frame 10 and then stop. So, yes, we get frames 5, 6, 7, 8, 9 and 10. These are actually the 6th, 7th, 8th, 9th, 10th and 11th frames because python starts at 0. |
Your results from the last tests are actually not doing that. For example, the last one has 7 frames 1 [[119, 123, 125, 125, 120, 126], |
Frame 5 6 7 8 9 10 |
oh, yeah. I forgot it worked like that. Sorry |
Yes, it might be confusing, but it is easier to extract things. |
That wasn't the part that needed checking now. I've now been fixing the single interactions cases |
For example, this one:
|
Oh, I have a fix for this problem that’s making the tests fail now. I just need to commit and push it |
No description provided.